/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Entity;

import java.sql.Date;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import java.util.ArrayList;
import java.util.List;
import javax.persistence.CascadeType;
import javax.persistence.OneToOne;

/**
 *
 * @author cheeseng
 */
@Entity
public class SalesQuotation extends SalesInquiry {

    @OneToMany(cascade = {CascadeType.PERSIST}, mappedBy = "SaleQuotation")
    private List<PurchaseOrder> purchaseOrder = new ArrayList();
    @OneToOne(cascade = {CascadeType.PERSIST})
    private Address shippingAddress;
    private Integer leadTime;
    private Date expiredDate;
    private String quotationNum;
    private String quotationStatus;

    public SalesQuotation() {
    }

    public void create(String quotationNum, Address shippingAddress, Integer leadTime, Date expiredDate, String quotationStatus, Date createdDate) {
        this.quotationNum = quotationNum;
        this.leadTime = leadTime;
        this.shippingAddress = shippingAddress;
        this.expiredDate = expiredDate;
        this.quotationStatus = quotationStatus;
    }

    public Date getExpiredDate() {
        return expiredDate;
    }

    public void setExpiredDate(Date expiredDate) {
        this.expiredDate = expiredDate;
    }

   
    public Address getShippingAddress() {
        return shippingAddress;
    }

    public void setShippingAddress(Address shippingAddress) {
        this.shippingAddress = shippingAddress;
    }

    public Integer getLeadTime() {
        return leadTime;
    }

    public void setLeadTime(Integer leadTime) {
        this.leadTime = leadTime;
    }

    public List<PurchaseOrder> getPurchaseOrder() {
        return purchaseOrder;
    }

    public void setPurchaseOrder(List<PurchaseOrder> purchaseOrder) {
        this.purchaseOrder = purchaseOrder;
    }

    public String getQuotationNum() {
        return quotationNum;
    }

    public void setQuotationNum(String quotationNum) {
        this.quotationNum = quotationNum;
    }

    public String getQuotationStatus() {
        return quotationStatus;
    }

    public void setQuotationStatus(String quotationStatus) {
        this.quotationStatus = quotationStatus;
    }
}
